/*
 * Copyright 2011-2012 by The Regents of the University of California Licensed
 * under the Apache License, Version 2.0 (the "License"); you may not use this
 * file except in compliance with the License. you may obtain a copy of the
 * License from
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package edu.ucsd.db.bassarisk.query.expression.visitor;

import edu.ucsd.db.bassarisk.exception.VisitorException;
import edu.ucsd.db.bassarisk.query.expression.Expressions.BooleanAnd;
import edu.ucsd.db.bassarisk.query.expression.Expressions.BooleanExpr;
import edu.ucsd.db.bassarisk.query.expression.Expressions.BooleanNot;
import edu.ucsd.db.bassarisk.query.expression.Expressions.BooleanOr;
import edu.ucsd.db.bassarisk.query.expression.Expressions.KeywordMatchExpr;
import edu.ucsd.db.bassarisk.query.expression.Expressions.NonterminalExpr;
import edu.ucsd.db.bassarisk.query.expression.Expressions.PositionMaxSeparation;
import edu.ucsd.db.bassarisk.query.expression.Expressions.PositionMinSeparation;
import edu.ucsd.db.bassarisk.query.expression.Expressions.PositionOrdered;
import edu.ucsd.db.bassarisk.query.expression.Expressions.PositionPhrase;
import edu.ucsd.db.bassarisk.query.expression.Expressions.PositionPredExpr;
import edu.ucsd.db.bassarisk.query.expression.Expressions.PositionSeparation;
import edu.ucsd.db.bassarisk.query.expression.Expressions.PositionWindow;
import edu.ucsd.db.bassarisk.query.expression.Expressions.StructureFind;
import edu.ucsd.db.bassarisk.query.expression.Expressions.StructureIn;
import edu.ucsd.db.bassarisk.query.expression.Expressions.StructurePredExpr;
import edu.ucsd.db.bassarisk.query.expression.Expressions.StructureSame;

public interface ExpressionTreeVisitor<R, A> {
  R visitBooleanAnd(BooleanAnd expr, A arg) throws VisitorException;

  R visitBooleanExpr(BooleanExpr expr, A arg) throws VisitorException;

  R visitBooleanNot(BooleanNot expr, A arg) throws VisitorException;

  R visitBooleanOr(BooleanOr expr, A arg) throws VisitorException;

  R visitKeywordMatchExpr(KeywordMatchExpr expr, A arg) throws VisitorException;

  R visitNonterminalExpr(NonterminalExpr expr, A arg) throws VisitorException;

  R visitPositionMaxSeparation(PositionMaxSeparation expr, A arg)
      throws VisitorException;

  R visitPositionMinSeparation(PositionMinSeparation expr, A arg)
      throws VisitorException;

  R visitPositionOrdered(PositionOrdered expr, A arg) throws VisitorException;

  R visitPositionPhrase(PositionPhrase expr, A arg) throws VisitorException;

  R visitPositionPredExpr(PositionPredExpr expr, A arg) throws VisitorException;

  R visitPositionSeparation(PositionSeparation expr, A arg) throws VisitorException;

  R visitPositionWindow(PositionWindow expr, A arg) throws VisitorException;

  R visitStructureFind(StructureFind expr, A arg) throws VisitorException;

  R visitStructureIn(StructureIn expr, A arg) throws VisitorException;

  R visitStructurePredExpr(StructurePredExpr expr, A arg) throws VisitorException;

  R visitStructureSame(StructureSame expr, A arg) throws VisitorException;
}